(() => {
	let ele = {}

	// 尊享客服
	ele.enjoy = $('#enjoy')
	ele.modal_enjoyment = $('#modal-enjoyment')
	ele.confirm_enjoyment = $('#confirm-enjoyment')
	// 尊享客服qq
	ele.modal_zun = $('#modal-zun')
	ele.copy_zun = $('#copy-zun')
	ele.close_zun = $('#close-zun')
	ele.close_zun.onclick = () => {
		ele.modal_zun.style.display = 'none'
	}
	// 复制尊享客服qq
	let zunQQ = '2885546014'
	ele.copy_zun.onclick = () => {
		let flag = copy(zunQQ);
		if (flag) openTips("复制成功");
		else openTips("复制失败，请手动复制");
	};
	// 尊享客服
	let recharge_total = getCookie('recharge_total')
	ele.enjoy.onclick = () => {
		if (recharge_total >= 1000) {
			ele.modal_zun.style.display = 'block'
		} else {
			ele.modal_enjoyment.style.display = 'block'
		}
	}
	ele.confirm_enjoyment.onclick = () => {
		ele.modal_enjoyment.style.display = 'none'
	}

	// 团长客服
	ele.team = $('#team')
	ele.modal_team = $('#modal-team')
	ele.confirm_team = $('#confirm-team')
	// 团长客服
	let family_level = getCookie('family_level')
	ele.team.onclick = () => {
		if (family_level >= 2) {
			location.href = 'customer-service3.html'
		} else {
			ele.modal_team.style.display = 'block'
		}

	}
	ele.confirm_team.onclick = () => {
		ele.modal_team.style.display = 'none'
	}

	// 装备奖励QQ群
	ele.equipment = $('#equipment')
	ele.modal_rewards = $('#modal-rewards')
	ele.copy_rewards = $('#copy-rewards')
	ele.close_reward = $('#close-reward')
	// 装备奖励QQ群
	ele.equipment.onclick = () => {
		ele.modal_rewards.style.display = 'block'
	}
	ele.close_reward.onclick = () => {
		ele.modal_rewards.style.display = 'none'
	}
	//  复制装备奖励QQ群
	let qq = '850779688'
	ele.copy_rewards.onclick = () => {
		let flag = copy(qq);
		if (flag) openTips("复制成功");
		else openTips("复制失败，请手动复制");
	};
})();